package com.clerkq.CircleList.view
{
	
	import com.library.core.IDisposable;
	import com.library.utils.Geometry;
	
	import flash.display.Shape;
	import flash.display.Sprite;

    public class ArrowButton extends Sprite implements IDisposable {

        public var id:String;
        private var _arrow:Shape
        private var _hitArea:Shape;

        public function ArrowButton(degree:Number = 0){
        	buttonMode = true;
            mouseChildren = false;
            createHitArea();
            createArrow(degree);
        }
        
        private function createArrow(degree:Number = 0):void{

            _arrow = Geometry.drawTriangle(15, 0xffff00, 1.0, 0x0000ff, 1.0, 1);
            addChild(_arrow);
            _arrow.rotation = degree;
            _arrow.x = _hitArea.x + _hitArea.width/2;
            _arrow.y = _hitArea.y + _hitArea.height/2;
        }
        
        private function createHitArea():void{
        	_hitArea = Geometry.drawRect(30, 30, 0xaaffcc, 1.0);
        	addChild(_hitArea);
        }
        
        public function Dispose():void
		{
		}
    }
}